/**
 * kl yy-ds @2021
 */
package com.cxps.server.listener;

import com.cxps.server.order.service.OrderService;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 监听支付订单
 * @author YouCai.Liu
 * @since 2021/11/23
 * ...
 */
@Service
@RocketMQMessageListener(consumerGroup = "pay-order-consumer-group", topic = "pay_order_topic",
        consumeThreadMax=4)
public class ListenerOrder implements RocketMQListener<MessageExt> {

    @Autowired
    private OrderService orderService;

    @Override
    public void onMessage(MessageExt message) {
        orderService.handlerMsg(message);
    }

}
